home *** CD-ROM | disk | FTP | other *** search
- /* ZoomSel.pvrx---This macro will get the coordinates of the the bounding box
- of all selected objects, and zoom in exactly to those limits.
- Copyright © 1989 by Taliesin, Inc.
- Authors: Jeff Blume & Ross Cunniff
- Usage: Assign to Ctrl-Key or RX tool
- The macro expects to find at least one selected object. */
-
- /* Try to lock project window.
- If can't get lock, not polite to interrupt. */
- 'Lock'
- if rc ~= 0 then exit
-
- /* get the bounding box coords */
- 'SelExtent' Ext
- if rc ~=0 then call Error "No Objects Selected!"
-
- /*
- Xborder = abs(Ext.X2-Ext.X1) / 100 /* Border around objs 1/100th of view width */
- Xborder = abs(Ext.X2-Ext.X1) / 10 /* Border around objs 1/10th of view width */
- */
- Xborder = abs(Ext.X2-Ext.X1) / 25
- /*Yborder*/ /* Border around objs 1/Xth of view height */
-
- Ext.X1 = Ext.X1 - Xborder; Ext.Y1 = Ext.Y1 - Xborder /* !!this assumes 0,0 is up-left!! */
- Ext.X2 = Ext.X2 + Xborder; Ext.Y2 = Ext.Y2 + Xborder
-
- /* zoom into those coords */
- 'SetView Ext'
- 'Repair'
-
- ERROR:
- arg ErrTxt
- if RC ~= 0 | ErrTxt ~= "" then 'GetBool ErrTxt "Cancel" "Cancel"'
- 'UnLock'
- exit
-
- /*
- ERROR:
- arg ErrTxt
- if RC ~= 0 | ErrTxt ~= "" then do
- 'GetBool ErrTxt "Cancel" "Cancel"'
- end
- 'UnLock'
- exit
-
- SIGNAL ON ERROR
- ERROR:
- if RC ~= 0 then do
- call ErrCON "Must first select objects!",RC
- end
- 'UnLock'
- exit
- */
-